﻿using ProxyKit;

namespace WebAPI.Configure
{
    public static class ProxyKitExtensions
    {
        public static void AddBuildinProxyKit(this IServiceCollection services)
        {
            services.AddProxy();
            services.AddSingleton<ProxyHandler>();

        }

        public static void UseBuildinProxyKit(this IApplicationBuilder app)
        {
            app.RunProxy<ProxyHandler>();
        }

    }
}
